{layout name="p/base"}
    <div class="row">
      <div class="col-lg-12">
        <h1>会员管理 <small>会员信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 会员信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以添加、修改、删除会员信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <form class="form-horizontal" role="form" action="/user/userlist" method="get">
          
          <div class="form-group col-sm-2" style="margin-right:10px;">
            <label for="">状态</label>
            <select class="form-control" name="status">
              <option selected value="">全部</option>
              {if(input('get.status') === '0')}
              <option selected value="0">未绑定</option>
              {else/}
              <option value="0">未绑定</option>
              {/if}
              {if(input('get.status') == 1)}
              <option selected value="1">已绑定</option>
              {else/}
              <option value="1">已绑定</option>
              {/if}
              
            </select>
          </div>
          <div class="form-group col-sm-2" style="margin-right:10px;">
            <label for="">请输入搜索条件</label>
            <select class="form-control" name="searchfield">
              <!-- <option selected value="">全部</option> -->
              {if(input('get.searchfield') == 'real_name')}
              <option selected value="real_name">姓名</option>
              {else/}
              <option value="real_name">姓名</option>
              {/if}
              {if(input('get.searchfield') == 'email')}
              <option selected value="email">邮箱</option>
              {else/}
              <option value="email">邮箱</option>
              {/if}
              {if(input('get.searchfield') == 'phone')}
              <option selected value="phone">手机号</option>
              {else/}
              <option value="phone">手机号</option>
              {/if}
            </select>
          </div>
          <div class="form-group col-sm-2 input-group">  
            <label for="">请输入关键字</label>
            <input class="form-control" type="text" value="{:input('get.keyword')}" placeholder="请输入会员信息" name="keyword">
            <label for="">&nbsp;</label>
            <span class="input-group-btn">
              <button class="btn btn-default" type="submit">搜索</button>
            </span>
          </div>
          <div class="clearfix"></div>
        </form>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>账号</th>
                <th>姓名</th>
                <th>手机号码</th>
                <th>邮箱</th>
                <th>营地名称</th>
                <th>泊位编号</th>
                <th>注册时间</th>
                <th>状态</th>
                <th>实名认证</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <form id="member" class="form-horizontal" role="form" action="/member/delete" method="post">
            <input type="hidden" id='method' name="_method" value="DELETE">
            <input type="hidden" name="status" value='0' />
            {volist name='list' id='vo'}
          
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}"></span></div></td>
                <td>{$vo.mobile}</td>
                <td>{$vo.real_name}</td>
                <td>{$vo.mobile}</td>
                <th>{$vo.email}</th>
                <th>{$vo.camps.name}</th>
                <th>{$vo.park_num}</th>
                <td>{$vo.created_at}</td>
                <td>{$vo.status}</td>
                <td>{$vo->getAuthentication($vo['authentication'])}</td>
                <td>
                <a href="/user/read?id={$vo.id}">查看</a>
                </td>
              </tr>
          {/volist}
        </form>
      </tbody>
    </table>


          <!-- 弹出层start -->
          <div class="modal fade" id="memView" tabindex="-1" role="dialog" 
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">
                <form class="form-horizontal" role="form" action="" method="post">
                  <div class="modal-header">
                    <button type="button" class="close" 
                       data-dismiss="modal" aria-hidden="true">
                          &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                       会员信息
                    </h4>
                  </div>
                  <div class="modal-body">
                    <table class="table table-hover">
                       <tbody>
                          <tr>
                             <td>会员账号</td>
                             <td></td>
                             <td>会员类型</td>
                             <td>双辉会员</td>
                          </tr>
                          <tr>
                             <td>真实姓名</td>
                             <td></td>
                             <td>手机号码</td>
                             <td>18877458545</td>
                          </tr>
                          <tr>
                             <td>关联泊位</td>
                             <td>sjz1304308866</td>
                             <td>关联房车</td>
                             <td>sjz1304308888</td>
                          </tr>
                          <tr>
                             <td>邮箱地址</td>
                             <td>45854585@qq.com</td>
                             <td>固定电话</td>
                             <td>031188989858</td>
                          </tr>
                          <tr>
                             <td>通讯地址</td>
                             <td colspan="3">河北省石家庄裕华区嘉华路9号</td>
                          </tr>
                          <tr>
                             <td>驾驶员</td>
                             <td>赵四</td>
                             <td>驾驶证号</td>
                             <td>130430198502081254</td>
                          </tr>
                          <tr>
                             <td>驾驶员</td>
                             <td>赵四</td>
                             <td>驾驶证号</td>
                             <td>130430198502081254</td>
                          </tr>
                       </tbody>
                    </table>
                  </div>
                  <div class="modal-footer">
                    <button type="button" class="btn btn-default" 
                       data-dismiss="modal">关闭
                    </button>
                  </div>
                </form>
              </div>
              <!-- /.modal-content -->
            </div>
          </div>
          <!-- 弹出层end -->
        </div>
      </div>
    </div>
